#include "jianzhi/4.h"
#include "gtest/gtest.h"

TEST(TestJianzhiSolutions, TestProblem4)
{
    jianzhi_4::Solution s;
    vector<vector<int>> matrix = {{1, 4, 7, 11, 15},
                                  {2, 5, 8, 12, 19},
                                  {3, 6, 9, 16, 22},
                                  {10, 13, 14, 17, 24},
                                  {18, 21, 23, 26, 30}};
    ASSERT_TRUE(s.findNumberIn2DArray(matrix, 5));
    ASSERT_FALSE(s.findNumberIn2DArray(matrix, 20));
}